home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Games Collection 1
/
software vault.zip
/
software vault
/
CDR10
/
SPX20.ZIP
/
SPX_DOC.ZIP
/
SPX_TXT.DOC
< prev
next >
Wrap
Text File
|
1993-09-14
|
2KB
|
75 lines
{ SPX Library Version 2.0 Copyright 1993 Scott D. Ramsay }
SPX_TXT is the raster font handling unit. It also allows you to
display your own fonts. Has a built in small text font. (Font used in
GUI- of vspmaker and geomaker.)
───────────────────────────────────────────────────────────────────────────
function stlen(s:string):word;
Returns the width of the string in pixels based on the current font.
S: String to check
───────────────────────────────────────────────────────────────────────────
procedure putletter(x,y:integer;c:byte;s:string);
Display a string on the active page.
X,Y: Top-left position to place text;
C: Color of text;
S: String to display
NOTE: IF (X) is negative then the text is centered on the screen
───────────────────────────────────────────────────────────────────────────
procedure drawletter(x,y:integer;c,c2:byte;s:string);
Drawletter is the same as putletter with the following addition:
putletter(x+1,y+1,c2,s);
putletter(x,y,c,s);
This allows for shaded text. Set the GUI's vspmaker and geomaker for
visual examples.
───────────────────────────────────────────────────────────────────────────
procedure putchar(x,y:integer;h:char;c:byte);
Display a character on the active page.
X,Y: Top-left position to place character;
H: Character to display;
C: Color of character
───────────────────────────────────────────────────────────────────────────
procedure loadchb(fn:string;var cdata);
Load a .CHB character font from disk.
FN: DOS file name of .CHB font file;
CDATA: Character list to store the loaded font
───────────────────────────────────────────────────────────────────────────
procedure setchb(var buff);
Sets the current loaded font.
BUFF: Buffer location of the new font
EXAMPLE:
var
myfont : CharList;
.
.
.
Loadchb('myfont.chb',myfont);
setchb(myfont);
putletter(0,0,15,'This is my font');
───────────────────────────────────────────────────────────────────────────